package com.sugon.service.impl;

import cn.hutool.core.util.RandomUtil;
import com.sugon.dao.ModuleSeriesTypeAssociationDao;
import com.sugon.entity.ModuleSeriesTypeAssociationEntity;
import com.sugon.service.ModuleSeriesTypeAssociationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 模具系列机型关联Service实现类
 *
 * @author sugon
 * @date 2019-08-19 10:42:29
 */
@Service("moduleSeriesTypeAssociationService")
public class ModuleSeriesTypeAssociationServiceImpl implements ModuleSeriesTypeAssociationService {
    @Autowired
    private ModuleSeriesTypeAssociationDao moduleSeriesTypeAssociationDao;

    @Override
    public ModuleSeriesTypeAssociationEntity queryObject(String id) {
        return moduleSeriesTypeAssociationDao.queryObject(id);
    }

    @Override
    public List<ModuleSeriesTypeAssociationEntity> queryList(Map<String, Object> map) {
        return moduleSeriesTypeAssociationDao.queryList(map);
    }

    @Override
    public int queryTotal(Map<String, Object> map) {
        return moduleSeriesTypeAssociationDao.queryTotal(map);
    }

    @Override
    public int save(ModuleSeriesTypeAssociationEntity moduleSeriesTypeAssociation) {
        moduleSeriesTypeAssociation.setId(RandomUtil.randomString(32));
        return moduleSeriesTypeAssociationDao.save(moduleSeriesTypeAssociation);
    }

    @Override
    public int update(ModuleSeriesTypeAssociationEntity moduleSeriesTypeAssociation) {
        return moduleSeriesTypeAssociationDao.update(moduleSeriesTypeAssociation);
    }

    @Override
    public int delete(String id) {
        return moduleSeriesTypeAssociationDao.delete(id);
    }

    @Override
    public int deleteBatch(String[] ids) {
        return moduleSeriesTypeAssociationDao.deleteBatch(ids);
    }
}
